package com.weng.cloud.service8881.zuul;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: weng
 * @Date: 2022/3/13
 * @Description: com.weng.cloud.service8881.zuul
 */
@RestController
public class TestZuulController {


    @GetMapping("/testZuulFilter/{numb}")
    public String testZuulFilter(@PathVariable Integer numb, HttpServletRequest request){
        System.err.println("有钱的话,我也想掐住08的头 => "+numb);
        //经测试，zuulFilter并不适合对请求参数做处理
        //Object numbObj = request.getAttribute("numb");
        //return "我以为我的百度云充的是年费会员,但是并不是 => "+numbObj.toString();
        return "我以为我的百度云充的是年费会员,但是并不是";
    }
}
